package com.bigdatastudio.common.Exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * @author xiao_jie
 * @date 2022/10/5 16:21
 * @describe 自定义异常类，统一反馈给前端错误信息
 */

@ResponseStatus(value = HttpStatus.FORBIDDEN, reason="说明错误的信息")
public class CustomException extends RuntimeException{

    private Integer code;

    public CustomException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public CustomException() {
    }

}
